#athread_3d version of 3d7p 


filename=3d7p_athread_3d_info.log
stream_time=3d7p_athread_3d_exec_time.log

rm $filename
touch $filename
rm $stream_time
touch $stream_time

for sizei in 514
do 
  for sizej in 514
  do  
    for sizez in 514
    do
     for blkx in  8
     do
      for blky in  8
        do  
          for blkz in  8
          do
            for p in 1
            do
              swcc -DCHECK -DSIZEX=$sizei -DSIZEY=$sizej -DSIZEZ=$sizez  -DBLKX=$blkx -DBLKY=$blky -DBLKZ=$blkz -I/usr/sz/swcc/sw3gcc-binary/include  -c master.c 
              sw3cc -DCHECK -DSIZEX=$sizei -DSIZEY=$sizej -DSIZEZ=$sizez -DBLKX=$blkx -DBLKY=$blky -DBLKZ=$blkz  -c slave.c
              sw3cc -hybrid -DCHECK   -o 3d7p master.o slave.o
              for num in {1..5}
              do
                echo "stream running, T=100 -DSIZEX=$sizei -DSIZEY=$sizej -DSIZEZ=$sizez -DBLKY=$blky -DBLKZ=$blkz -Dthread_num=$p number=$num " 
                echo "stream  runing, T=100 -DSIZEX=$sizei -DSIZEY=$sizej -DSIZEZ=$sizez -DBLKY=$blky -DBLKZ=$blkz -Dthread_num=$p number=$num" >> $filename
                srun -b -m 1 -p host  -N 1 -n $p -s 4096  -K 256 ./3d7p $p >> $filename
              done
	      rm *.o 3d7p
            done
          done 
         done
        done
      done
  done
done
grep -E 'time:' $filename>>$stream_time

